package org.example.mallweb.mallservice.mq;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author 韩先楚
 */
@Component
public class TestProvider {

    @Autowired
    private RabbitTemplate rabbitTemplate;

    public void send(String message) {
       rabbitTemplate.convertAndSend("testDirect","test", "Hello World!");
    }
}
